<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
    <script type="text/javascript" src="../../js/jquery.js"></script>
    <script>
        function setSpeed(uuid){
            var speed = $('#speedPerSecond_'+uuid).val();
            $.ajax({
                url:'setSpeed.action?speed='+speed+'&uuid='+uuid,
                success:function(data){
                    alert('设置成功');
                },
                fail:function(data){
                    alert('设置失败');
                }
            });
        }
    </script>
</head>
<body>
<table border="1">
    <tr><th>UUID</th><th>名字</th><th>速度/秒</th><th>操作</th></tr>
        <s:iterator value="list" id="contentFormat">
            <tr>
                <td><s:property value="#contentFormat.uuid" escape="false"/></td>
                <td><s:property value="#contentFormat.name" escape="false"/></td>
                <td><input id="speedPerSecond_<s:property value="#contentFormat.uuid" escape="false"/>" type="text" value="<s:property value="#contentFormat.speedPerSecond" escape="false"/>" size="5"/></td>
                <td><a href="javascript:setSpeed('<s:property value="#contentFormat.uuid" escape="false"/>')">设置速度</a></td>
            </tr>
        </s:iterator>
</table>
</body>
</html>